package Chapter05.Fruite;

import java.util.ArrayList;
import java.util.List;

public class User {
    private String username;
    private String password;
    private List<Fruit> cart = new ArrayList<Fruit>();

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public void addToCart(Fruit fruit) {
        cart.add(fruit);
    }

    public List<Fruit> getCart() {
        return cart;
    }
}
